package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.ProductUnitRateEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface ProductUnitRateDao {

    Integer insert(ProductUnitRateEntity entity);

    void insertBatch(@Param("list") List<ProductUnitRateEntity> list);

    ProductUnitRateEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    Integer update(ProductUnitRateEntity entity);

    List<ProductUnitRateEntity> findEntities(@Param("param") Map<String, Object> param);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);

    void deleteByGroupId(@Param("groupId") Long groupId, @Param("corpid") String corpid);

    void deleteBatch(@Param("list") List<ProductUnitRateEntity> delList, @Param("corpid") String corpid);

    void updateBatch(@Param("list") List<ProductUnitRateEntity> updateList, @Param("corpid") String corpid);
}